<script lang='ts' setup>
import { luckysheet } from '@report-engine/sheet'
import { nextTick, onMounted, useCssModule } from 'vue'

const cssModule = useCssModule()

onMounted(() => {
  nextTick(() => {
    luckysheet.create({
      container: cssModule.sheet,
      title: '演示表格',
      lang: 'zh',
      data: undefined,
      column: 100,
      row: 100,
      enableAddRow: false,
      userInfo: true,
      myFolderUrl: () => {
        history.go(-1)
      },
    })
  })
})
</script>

<template>
  <div :id="cssModule.sheet" :class="cssModule.sheet" />
</template>

<style lang='scss' module>
.sheet {
  width: 100%;
  height: 100%;
}
</style>
